package com.kcyu.sfherp.entity.utilEntity;


import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class ExcelChmx {

    @ExcelProperty("单号")
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
    @ColumnWidth(12)
    private String dh;

    @ExcelProperty("品名")
    @ColumnWidth(24)
    private String spname;

    @ExcelProperty("单位")
    @ColumnWidth(7)
    private String dw;

    @ExcelProperty("数量")
    @ColumnWidth(7)
    private Float sl;

    @ExcelProperty("单价")
    @ColumnWidth(-1)
    private Float jg;

    @ExcelProperty("金额")
    @ColumnWidth(-1)
    private WriteCellData<Number> je;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("日期")
    @ColumnWidth(17)
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.RIGHT)
    private Timestamp rq;

    @ExcelProperty("客户名称")
    @ColumnWidth(20)
    private String khname;
}
